home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-16 | 1.9 KB | 68 lines | [TEXT/MPS ] |
- ### File RezC.SIZE
- ### Generates Rez input for MultiFinder/Switcher Size resource
- ### W. Powell 1988
- ### WARNING: The size resource syntax is different with
- ### different MPW versions. By default this script
- ### is set to work with MPW vers. 3.0,
- ### To change to MPW 2.02 compatability, set the following
- ### shell variable "MPWSizeVers" to anything other than "3".
- Set MPWSizeVers "3"
-
- Set Exit 0
- Set rid {1}
- If {rid} != -1
- Alert "WARNING: Resource ID must be -1 to be used by MultiFinder or Switcher."
- End
- Echo -n "Resource ∂'SIZE∂' ({rid}"
- Shift 1
- If "{1}" == "-nms"
- Echo -n ",∂"{2}∂""
- Shift 2
- End
- # Size settings in Kbyte
- Set Pref {1}
- Set Min {2}
- # Flags
- Set Op1 {3}
- Set Op2 {4}
- Set Op3 {5}
- Set Op4 {6}
- Set Op5 {7}
- ###########
- # The following was added to work with MPW version 3.0 Types.r
- # older MPW versions may use different symbolic constants
- # Change the following to match symbolic constants from the
- # Types.r file in your {RIncludes} directory.
- If ( "{7}" == "doOwnActivate" )
- Set Op5 "multiFinderAware"
- Else If ( "{7}" == "dontDoOwnActivate" )
- Set Op5 "notMultiFinderAware"
- End #if
- ###########
- Shift 7
-
- # Resource attributes
- If ( "{1}" == "-sy" ) ; Echo -n ",SysHeap" ; Shift ; End
- If ( "{1}" == "-pu" ) ; Echo -n ",Purgeable" ; Shift ; End
- If ( "{1}" == "-lo" ) ; Echo -n ",Locked" ; Shift ; End
- If ( "{1}" == "-Pr" ) ; Echo -n ",Protected" ; Shift ; End
- If ( "{1}" == "-PL" ) ; Echo -n ",PreLoad" ; Shift ; End
- Echo ") ∂{"
-
- Echo "∂t{Op1},"
- Echo "∂t{Op2},"
- Echo "∂t{Op3},"
- Echo "∂t{Op4},"
- Echo "∂t{Op5},"
- If ( "{MPWSizeVers}" == "3" ) # for MPW version 3.0
- Echo "∂treserved, reserved, reserved, reserved,"
- Echo "∂treserved, reserved, reserved, reserved,"
- Echo "∂treserved, reserved, reserved,"
- End
- # Convert sizes to bytes
- Set Pref `Evaluate {Pref} * 1024 `
- Set Min `Evaluate {Min} * 1024 `
- Echo "∂t{Pref},∂t∂/* Preferred size, bytes *∂/"
- Echo "∂t{Min} ∂t∂/* Minimum size, bytes *∂/"
- Echo "∂t∂};"
- Exit 0